import request from '@/utils/request';
const suffix = '/api/permission/';
// 角色管理列表查询
export const roleList = data => request({
  url: `${suffix}roleList`,
  method: 'post',
  data: data
});
// 角色人员列表查询
export const getRoleUserList = data => request({
  url: `${suffix}getRoleUserList`,
  method: 'post',
  data: data
});
// 角色新增
export const add = data => request({
  url: `${suffix}role/add`,
  method: 'post',
  data: data
});
// 角色编辑
export const update = data => request({
  url: `${suffix}role/update`,
  method: 'post',
  data: data
});
// 角色删除
export const del = data => request({
  url: `${suffix}role/delete`,
  method: 'post',
  data: data
});
// 角色添加
export const userAdd = data => request({
  url: `${suffix}roleUser/add`,
  method: 'post',
  data: data
});
// 保存角色权限
export const addRoleRightButton = data => request({
  url: `${suffix}addRoleRightButton`,
  method: 'post',
  data: data
});
// 获取角色权限树
export const geRoleTree = userId => request({
  url: `${suffix}getMenuTree/${userId}`,
  method: 'get'
});

